package LEKIEUANH.OPP.EX04;

public class MODELS {

	public int CheckDayOfMonth(int Thang, int Nam){
		int Result = 0;
		switch (Thang) {
		case 4:
		case 6:
		case 9:
		case 11:
			Result = 30;
			break;
		case 2:
			if((Nam%400 == 0) || (Nam%4 == 0 && Nam%100!=0)){
				Result = 29;
			}else Result = 28;
			break;
		case 1:
		case 3:
		case 5:
		case 7:
		case 8:
		case 10:
		case 12:
			Result = 31;
			break;
		}
		return Result;
	}
}
